﻿#define _CRT_SECURE_NO_WARNINGS   1
#include<stdio.h>

#include<stdlib.h>

void buble(int* a, int n) {

    for (n; n > 0; n--)

    {

        for (int i = 1; i < n; i++)

        {

            if (a[i - 1] < a[i])

            {
                int tmp = a[i];

                a[i] = a[i - 1];

                a[i - 1] = tmp;



            }

        }



    }



}

int main()

{

    int n = 0;

    scanf("%d", &n);

    int* a = (int*)malloc(n * sizeof(int));

    for (int i = 0; i < n; i++) {

        scanf("%d", &a[i]);

    }

    buble(a, n);



    int left = 0;

    int right = 1;
    // 2 2 3 5 7
    // 7 7 5 2 2
    while (right < n) {

        if (a[right - 1] != a[right])

        {

            a[left++] = a[right - 1];

        }
        
        right++;
    }
  
        a[left++] = a[n-1];
    

    for (int i = 0; i < left; i++)

    {
        printf("%d ", a[i]);
    }











    return 0;

}











